.class public Les/hi;
.super Ljava/lang/Object;
.source "MemoryScanner.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/hi$b;
    }
.end annotation


# instance fields
.field private a:Les/ei;

.field private b:Les/bi;

.field private volatile c:Z

.field private final d:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 4

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Les/ei;

    const/4 v1, 0x1

    invoke-direct {v0, v1}, Les/ei;-><init>(I)V

    iput-object v0, p0, Les/hi;->a:Les/ei;

    const/4 v2, 0x0

    .line 3
    invoke-virtual {v0, v2}, Les/ei;->d(I)V

    .line 4
    iget-object v0, p0, Les/hi;->a:Les/ei;

    invoke-virtual {v0, v1}, Les/ei;->a(I)V

    .line 5
    iget-object v0, p0, Les/hi;->a:Les/ei;

    const-string v1, "Memory"

    invoke-virtual {v0, v1}, Les/ei;->d(Ljava/lang/String;)V

    .line 6
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v0

    .line 7
    iget-object v1, p0, Les/hi;->a:Les/ei;

    const v3, 0x7f110250

    invoke-virtual {v0, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Les/ei;->b(Ljava/lang/String;)V

    const v1, 0x7f11025a

    .line 8
    invoke-virtual {v0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Les/hi;->d:Ljava/lang/String;

    .line 9
    iput-boolean v2, p0, Les/hi;->c:Z

    return-void
.end method

.method static synthetic a(Les/hi;)Les/bi;
    .locals 0

    .line 4
    iget-object p0, p0, Les/hi;->b:Les/bi;

    return-object p0
.end method

.method private a(Landroid/app/ActivityManager;Landroid/content/pm/PackageManager;Ljava/util/Map;)V
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/app/ActivityManager;",
            "Landroid/content/pm/PackageManager;",
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Les/hi$b;",
            ">;)V"
        }
    .end annotation

    .line 10
    invoke-virtual {p1}, Landroid/app/ActivityManager;->getRunningAppProcesses()Ljava/util/List;

    move-result-object p1

    if-nez p1, :cond_0

    return-void

    .line 11
    :cond_0
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :cond_1
    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result p2

    if-eqz p2, :cond_7

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object p2

    check-cast p2, Landroid/app/ActivityManager$RunningAppProcessInfo;

    .line 12
    iget-boolean v0, p0, Les/hi;->c:Z

    if-nez v0, :cond_2

    goto :goto_2

    .line 13
    :cond_2
    iget-object v0, p2, Landroid/app/ActivityManager$RunningAppProcessInfo;->pkgList:[Ljava/lang/String;

    if-eqz v0, :cond_1

    .line 14
    array-length v1, v0

    if-gtz v1, :cond_3

    goto :goto_0

    :cond_3
    const/4 v1, 0x0

    .line 15
    aget-object v0, v0, v1

    if-eqz v0, :cond_1

    .line 16
    invoke-static {}, Les/ji;->a()Les/ji;

    move-result-object v1

    invoke-virtual {v1, v0}, Les/ji;->a(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_4

    goto :goto_0

    .line 17
    :cond_4
    iget-object v1, p2, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;

    if-eqz v1, :cond_1

    .line 18
    invoke-static {v1}, Les/ii;->a(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_5

    goto :goto_0

    .line 19
    :cond_5
    invoke-interface {p3, v0}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_6

    .line 20
    new-instance v2, Les/hi$b;

    invoke-direct {v2, p0}, Les/hi$b;-><init>(Les/hi;)V

    .line 21
    invoke-interface {p3, v0, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_1

    .line 22
    :cond_6
    invoke-interface {p3, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    move-object v2, v0

    check-cast v2, Les/hi$b;

    .line 23
    :goto_1
    iput-object v1, v2, Les/hi$b;->a:Ljava/lang/String;

    .line 24
    iget p2, p2, Landroid/app/ActivityManager$RunningAppProcessInfo;->pid:I

    .line 25
    invoke-virtual {v2, p2}, Les/hi$b;->a(I)V

    goto :goto_0

    :cond_7
    :goto_2
    return-void
.end method

.method private a(Landroid/app/ActivityManager;Ljava/util/Map;)V
    .locals 10
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/app/ActivityManager;",
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Les/hi$b;",
            ">;)V"
        }
    .end annotation

    .line 26
    invoke-interface {p2}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_3

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    .line 27
    invoke-interface {p2, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Les/hi$b;

    if-eqz v2, :cond_0

    .line 28
    invoke-virtual {v2}, Les/hi$b;->a()[I

    move-result-object v3

    if-nez v3, :cond_1

    goto :goto_0

    .line 29
    :cond_1
    invoke-virtual {v2}, Les/hi$b;->a()[I

    move-result-object v3

    .line 30
    invoke-virtual {p1, v3}, Landroid/app/ActivityManager;->getProcessMemoryInfo([I)[Landroid/os/Debug$MemoryInfo;

    move-result-object v3

    const-wide/16 v4, 0x0

    .line 31
    array-length v6, v3

    const/4 v7, 0x0

    :goto_1
    if-ge v7, v6, :cond_2

    aget-object v8, v3, v7

    .line 32
    invoke-virtual {v8}, Landroid/os/Debug$MemoryInfo;->getTotalPrivateDirty()I

    move-result v9

    invoke-virtual {v8}, Landroid/os/Debug$MemoryInfo;->getTotalSharedDirty()I

    move-result v8

    add-int/2addr v9, v8

    int-to-long v8, v9

    add-long/2addr v4, v8

    add-int/lit8 v7, v7, 0x1

    goto :goto_1

    .line 33
    :cond_2
    new-instance v3, Les/ei;

    invoke-virtual {v1}, Ljava/lang/String;->hashCode()I

    move-result v6

    iget-object v7, p0, Les/hi;->a:Les/ei;

    invoke-virtual {v7}, Les/ei;->j()I

    move-result v7

    const/4 v8, 0x1

    add-int/2addr v7, v8

    iget-object v9, p0, Les/hi;->a:Les/ei;

    invoke-direct {v3, v6, v7, v9}, Les/ei;-><init>(IILes/ei;)V

    .line 34
    invoke-virtual {v3, v1}, Les/ei;->d(Ljava/lang/String;)V

    .line 35
    iget-object v2, v2, Les/hi$b;->a:Ljava/lang/String;

    invoke-virtual {v3, v2}, Les/ei;->b(Ljava/lang/String;)V

    const/4 v2, 0x5

    .line 36
    invoke-virtual {v3, v2}, Les/ei;->d(I)V

    .line 37
    invoke-virtual {v3, v8}, Les/ei;->a(I)V

    const/16 v2, 0xa

    shl-long/2addr v4, v2

    .line 38
    invoke-virtual {v3, v4, v5}, Les/ei;->d(J)V

    .line 39
    iget-object v2, p0, Les/hi;->d:Ljava/lang/String;

    invoke-virtual {v3, v2}, Les/ei;->e(Ljava/lang/String;)V

    .line 40
    invoke-virtual {v3, v1}, Les/ei;->c(Ljava/lang/String;)V

    goto :goto_0

    :cond_3
    return-void
.end method

.method static synthetic a(Les/hi;Landroid/app/ActivityManager;Landroid/content/pm/PackageManager;Ljava/util/Map;)V
    .locals 0

    .line 2
    invoke-direct {p0, p1, p2, p3}, Les/hi;->b(Landroid/app/ActivityManager;Landroid/content/pm/PackageManager;Ljava/util/Map;)V

    return-void
.end method

.method static synthetic a(Les/hi;Landroid/app/ActivityManager;Ljava/util/Map;)V
    .locals 0

    .line 3
    invoke-direct {p0, p1, p2}, Les/hi;->a(Landroid/app/ActivityManager;Ljava/util/Map;)V

    return-void
.end method

.method private a(Ljava/util/List;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Les/ei;",
            ">;)V"
        }
    .end annotation

    if-nez p1, :cond_0

    return-void

    .line 6
    :cond_0
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Les/ei;

    .line 7
    invoke-virtual {v0}, Les/ei;->g()Ljava/util/List;

    move-result-object v0

    .line 8
    invoke-direct {p0, v0}, Les/hi;->a(Ljava/util/List;)V

    .line 9
    invoke-interface {v0}, Ljava/util/List;->clear()V

    goto :goto_0

    :cond_1
    return-void
.end method

.method static synthetic a(Les/hi;Z)Z
    .locals 0

    .line 1
    iput-boolean p1, p0, Les/hi;->c:Z

    return p1
.end method

.method static synthetic b(Les/hi;)Les/ei;
    .locals 0

    .line 2
    iget-object p0, p0, Les/hi;->a:Les/ei;

    return-object p0
.end method

.method private b(Landroid/app/ActivityManager;Landroid/content/pm/PackageManager;Ljava/util/Map;)V
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/app/ActivityManager;",
            "Landroid/content/pm/PackageManager;",
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Les/hi$b;",
            ">;)V"
        }
    .end annotation

    const p2, 0x7fffffff

    .line 5
    invoke-virtual {p1, p2}, Landroid/app/ActivityManager;->getRunningServices(I)Ljava/util/List;

    move-result-object p1

    if-nez p1, :cond_0

    return-void

    .line 6
    :cond_0
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :cond_1
    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result p2

    if-eqz p2, :cond_6

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object p2

    check-cast p2, Landroid/app/ActivityManager$RunningServiceInfo;

    .line 7
    iget-boolean v0, p0, Les/hi;->c:Z

    if-nez v0, :cond_2

    goto :goto_2

    .line 8
    :cond_2
    iget-object v0, p2, Landroid/app/ActivityManager$RunningServiceInfo;->service:Landroid/content/ComponentName;

    invoke-virtual {v0}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 9
    invoke-static {}, Les/ji;->a()Les/ji;

    move-result-object v1

    invoke-virtual {v1, v0}, Les/ji;->a(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_3

    goto :goto_0

    .line 10
    :cond_3
    iget-object v1, p2, Landroid/app/ActivityManager$RunningServiceInfo;->process:Ljava/lang/String;

    if-eqz v1, :cond_1

    .line 11
    invoke-static {v1}, Les/ii;->a(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_4

    goto :goto_0

    .line 12
    :cond_4
    invoke-interface {p3, v0}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_5

    .line 13
    new-instance v2, Les/hi$b;

    invoke-direct {v2, p0}, Les/hi$b;-><init>(Les/hi;)V

    .line 14
    invoke-interface {p3, v0, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_1

    .line 15
    :cond_5
    invoke-interface {p3, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    move-object v2, v0

    check-cast v2, Les/hi$b;

    .line 16
    :goto_1
    iput-object v1, v2, Les/hi$b;->a:Ljava/lang/String;

    .line 17
    iget p2, p2, Landroid/app/ActivityManager$RunningServiceInfo;->pid:I

    .line 18
    invoke-virtual {v2, p2}, Les/hi$b;->a(I)V

    goto :goto_0

    :cond_6
    :goto_2
    return-void
.end method

.method static synthetic b(Les/hi;Landroid/app/ActivityManager;Landroid/content/pm/PackageManager;Ljava/util/Map;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1, p2, p3}, Les/hi;->a(Landroid/app/ActivityManager;Landroid/content/pm/PackageManager;Ljava/util/Map;)V

    return-void
.end method


# virtual methods
.method public a()V
    .locals 1

    const/4 v0, 0x0

    .line 5
    iput-boolean v0, p0, Les/hi;->c:Z

    return-void
.end method

.method public a(Les/bi;)V
    .locals 0

    return-void
.end method

.method public b()Les/ei;
    .locals 1

    .line 4
    iget-object v0, p0, Les/hi;->a:Les/ei;

    return-object v0
.end method

.method public b(Les/bi;)V
    .locals 0

    .line 3
    iput-object p1, p0, Les/hi;->b:Les/bi;

    return-void
.end method

.method public c()V
    .locals 1

    .line 1
    iget-object v0, p0, Les/hi;->a:Les/ei;

    invoke-virtual {v0}, Les/ei;->g()Ljava/util/List;

    move-result-object v0

    .line 2
    invoke-direct {p0, v0}, Les/hi;->a(Ljava/util/List;)V

    .line 3
    invoke-interface {v0}, Ljava/util/List;->clear()V

    return-void
.end method

.method public d()V
    .locals 2

    .line 1
    invoke-virtual {p0}, Les/hi;->c()V

    .line 2
    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Les/hi$a;

    invoke-direct {v1, p0}, Les/hi$a;-><init>(Les/hi;)V

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    .line 3
    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    return-void
.end method
